---
title: Deleting Resources (DELETE)
excerpt: How to delete JSON:API resources using NextDrupal.
---

<Callout>

If you're working with JSON:API, be mindful to select the option:

`Accept all JSON:API create, read, update, and delete operations.`

on the following path: `/admin/config/services/jsonapi` in Drupal.

</Callout>

The `NextDrupal` client ships with a `deleteResource` method for deleting JSON:API resources.

---

## deleteResource

Delete an article by id.

```ts
const deleted = await drupal.deleteResource(
  "node--article",
  "a937dd34-5407-4fff-8594-fccaaa5bb72a" // <-- Article ID
)
```

See the API reference for [deleteResource](/api/classes/NextDrupal#deleteresource).

---

## Authentication

To make authenticated requests when deleting resources, use the `withAuth` option.

See the [authentication docs](/docs/authentication) for the supported authentication methods.

```ts
const deleted = await drupal.deleteResource(
  "node--article",
  "a937dd34-5407-4fff-8594-fccaaa5bb72a",
  // highlight-start
  {
    withAuth: // <-- Your auth method here.
  }
  // highlight-end
)
```
